<%@ page language="java" errorPage="/common/error.jsp" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8" %>
<%@ page isELIgnored="false" %>
<%@ include file="/common/taglibs.jsp"%>
<%@ taglib uri="http://www.shengruan.org/tags" prefix ="f"%> 
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Pragma" content="no-cache">
<link href="../style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="<c:url value='/admin/assets/js/jquery/jquery.js'/>"></script>
<script type="text/javascript" language="javascript">
// <![CDATA[
$(document).ready(function() {
<c:if test="${not empty requestScope.message}">
$("#infoSpan").html("<img src='<c:url value='/admin/assets/images/flag.gif'/>'><font color='#C00000'><c:out value='${requestScope.message}' escapeXml='false'/></font>");
</c:if>

});
// ]]>
</script>
</head>
<body class="main">
<table class="container" cellpadding="0" cellspacing="0">

<tr class="dark" valign="middle">
<td><input class="button" type="button" value="新增" onClick="document.location='adminAdd.jsp'">
</td>
</tr>
<c:if test="${not empty requestScope.message}">
<tr class="dark" valign="middle">
<td align="center"><span id="infoSpan" class="infoSpan">&nbsp;</span></td>
</tr>
</c:if>

<tr>
<td colspan="2"><table class="list" align="center" cellspacing="1" cellpadding="0">
<tr class="heading">
<td width=9%>序号</td>
<td width=16%>用户名</td>
<td width=6%>状态</td>
<td width=10%>登陆IP</td>
<td width=19%>登陆时间</td>
<td width=8%>登陆次数</td>
<td width=12%>手机号码</td>
<td width=12%>Email</td>
<td width=8%>&nbsp;</td>
</tr>
<c:set var="sort" value="0"/>
<c:forEach var="admin" items="${requestScope.adminList}">
<c:set var="sort" value="${sort+1}"/>
<tr <c:if test='${sort%2==0}'>class="odd"</c:if>>
  <td height="20">${sort}</td>
  <td height="20">${admin.username}</td>
  <td height="20">     
<c:if test="${admin.username!='admin'}">
<a href="<c:url value='/admin/system/admin-status.ac?id=${admin.id}'/>"><c:choose><c:when test="${admin.status == 1}"><img src="<c:url value='/admin/assets/images/ok.gif'/>" title="可用" width="16" height="17" border="0" /></c:when><c:otherwise><img src="<c:url value='/admin/assets/images/no.png'/>" title="禁用" width="16" height="17" border="0" /></c:otherwise></c:choose></a>
</c:if>     

  </td>
  <td height="20">${admin.lastloginIp}</td>
   <td height="20">${f:format(admin.lastloginTime)}</td>
    <td height="20">${admin.logins}</td>
    <td height="20">${admin.mobile}</td>
    <td height="20">${admin.email}</td>
  <td height="20" class="action">
  <c:if test="${admin.username!='admin' && admin.username != sessionScope.admin.username}">
  	  <a href="<c:url value='/admin/system/admin-delete.ac?id=${admin.id}'/>" onClick="return confirm('确认删除吗？')"><img src="../images/delete.gif" alt="删除" title="删除"></a>
  </c:if>
   <c:if test="${admin.username == sessionScope.admin.username}">
   	<img src="../images/delete_no.gif" alt="删除" title="删除">
  </c:if>
  &nbsp;&nbsp;<a href="<c:url value='/admin/system/admin-load.ac?id=${admin.id}'/>"><img src="../images/edit.gif" alt="编辑" title="编辑"></a>
</td>
</tr>
</c:forEach>
</table>
</td>
</tr>
</table>
</body>
</html>

